<template>
    <div class="oldversion">
        <Header :title="header_title" :right_text1="'保存'"></Header>
        <div class="topheader page">
            <div class="tip"></div>
            <van-cell-group inset class="textarea infofield oldtextarea">
                <van-field v-model="name" rows="1" autosize type="textarea" maxlength="20" placeholder="请输入"
                    show-word-limit />
            </van-cell-group>
        </div>
    </div>
</template>

<script>
import Header from '@/components/oldheader.vue'
import { Toast } from 'vant';
export default {
    components: {
        Header
    },
    data() {
        return {
            header_title: '',
            name: '',
            type:'',
            educationInfo: this.$store.state.educationInfo,
        }
    },
    mounted() {
        let params = this.$route.params;
        this.header_title = params.page;
        if (this.header_title == '学校名称') {
            this.name = this.educationInfo.graduateSchool;
            this.type = 'graduateSchool'
        } else if(this.header_title == '专业') {
            this.name = this.educationInfo.profess;
            this.type = 'profess'

        }

    },
    methods: {
        rightMethod() {
            this.educationInfo[this.type] = this.name;
            this.$store.commit('setskillInfoList', this.educationInfo);
            this.$router.replace('/oldeducation');
        },
        goback(){
            this.$router.replace('/oldeducation');
        }
    }
}
</script>

<style scoped>
.tip {
    height: 0.32rem;
}

.textarea .van-cell {
    padding: unset;
}

.van-cell-group--inset.textarea {
    margin: unset;
}
</style>